home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20000824-20010305 / 000209_news@columbia.edu _Fri Jan 12 14:43:10 2001.msg < prev    next >
Internet Message Format  |  2020-01-01  |  8KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
  3.     by uhaligani.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id OAA11335
  4.     for <kermit.misc@cpunix.cc.columbia.edu>; Fri, 12 Jan 2001 14:43:10 -0500 (EST)
  5. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  6.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id OAA07878
  7.     for <kermit.misc@watsun.cc.columbia.edu>; Fri, 12 Jan 2001 14:43:10 -0500 (EST)
  8. Received: (from news@localhost)
  9.     by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id OAA27705
  10.     for kermit.misc@watsun.cc.columbia.edu; Fri, 12 Jan 2001 14:22:40 -0500 (EST)
  11. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  12. Message-ID: <3A5F590E.21B5448A@cyberbills.com>
  13. From: Victor Zele <victor@cyberbills.com>
  14. Organization: CyberBills, Inc.
  15. Subject: Re: scripting problem
  16. Date: Fri, 12 Jan 2001 19:20:46 GMT
  17. To: kermit.misc@columbia.edu
  18.  
  19. Frank da Cruz wrote:
  20.  
  21. > In article <3A5DF487.D5E07811@cyberbills.com>,
  22. > Victor Zele  <victor@cyberbills.com> wrote:
  23. > : I do a set protocol zmodem at the beginning because that's the
  24. > : protocol supported by the remote server.
  25. > :
  26. > You didn't mention that in your original report.
  27. >
  28. > Zmodem is an external protocol in C-Kermit, meaning (a) you need to have
  29. > an external Zmodem program, and (b) the Zmodem program must operate on
  30. > standard i/o, so Kermit can redirect it over the communications connection.
  31. >
  32. > In any case, Kermit seems to be doing its job.  The following:
  33. >
  34. >   Retry 0: Timeout on pathname
  35. >
  36. > is a message from the Zmodem program (sz or whatever).  So either sz is
  37. > not allowing itself to be redirected (in which case you need another
  38. > Zmodem program, such crzsz), or else there is an error in your script,
  39. > but you didn't show us your script.
  40. >
  41. > - Frank
  42.  
  43. Well I tried installing crzsz and these Zmodem programs behave
  44. the same as the standard rzsz programs.  Besides why does the same
  45. commands work when I run them interactively in Kermit?  I do know
  46. that I am sending data at 8N1, but the compuserve number requires
  47. 7-bit terminal emulation that is default in Kermit.  I think it must be
  48. related to the script not having the exact terminal characteristics as an
  49. interactive session that is doing some additional handshaking between
  50. 7-bit Compuserv and the 8-bit server at the end.
  51.  
  52. Below is the script output and the same commands when running interactively
  53. and things working.  I have verbose output for the sz and csz programs.
  54.  
  55. Script output running SZ
  56. ===================================================
  57. Making outbound connection...CONNECTED
  58.  
  59.  
  60. The current File Transfer Protocol is ZMODEM
  61. sz 0.12.20
  62.  
  63. mode:1
  64.  
  65. Countem: 000 /root/bin/filestr.txt  54
  66. countem: Total 1 54
  67. zshhdr: ZRQINIT 0zshhdr: ZRQINIT 0Retry 0: Timeout on pathname
  68. getnak failed
  69. mode:0
  70.  
  71. Transfer incomplete
  72.  
  73. Now the interactive script commands output that works
  74. ===================================================
  75. C-Kermit 7.0.196, 1 Jan 2000, for Linux
  76.  Copyright (C) 1985, 2000,
  77.   Trustees of Columbia University in the City of New York.
  78. Type ? or HELP for help.
  79. (/root/bin/) C-Kermit>conn
  80.  
  81.  
  82. The current File Transfer Protocol is ZMODEM.
  83.  
  84.  
  85. (Back at sjp-gw1)
  86. ----------------------------------------------------
  87. (/root/bin/) C-Kermit>redirect sz -vvv /root/bin/\%f
  88. sz 0.12.20
  89.  
  90. mode:1
  91.  
  92. Countem: 000 /root/bin/filestr.txt  54
  93. countem: Total 1 54
  94. zshhdr: ZRQINIT 0zgethdr: ZRINIT 2f000000Rxbuflen=0 Tframlen=0
  95. mode:2
  96. Rxbuflen=1024
  97. Rxbuflen=1024 blklen=1024
  98. Txwindow = 0 Txwspac = 0
  99. Sending: filestr.txt
  100. zsbhdr: ZFILE 0zsdat32: 41 ZCRCWzgethdr: ZRPOS 0zsbhdr: ZDATA 0zsdat32: 54 ZCRCEBytes
  101. Sent:     54   BPS:9
  102. zshhdr: ZFIN 0zgethdr: ZFIN 0mode:0
  103.  
  104. Transfer complete
  105.  
  106. ----------------------------------------------------------------
  107. USING CSZ script output with failed transfer
  108.  
  109. The current File Transfer Protocol is ZMODEM
  110. csz 1.03 10-01-99 for POSIX tty=(null)
  111.  
  112. mode:3
  113. Baudrate = 4097
  114.  
  115. Countem: 000 filestr.txt   54
  116.  
  117. countem: Total 1 54
  118. zshhdr: f 4 ZRQINIT 80
  119. wcsend: argc=1
  120. Sending name=filestr.txt
  121. wctxpn: filestr.txt
  122. Retry 0: Awaiting pathname nak for filestr.txt
  123. Readline:TIMEOUT
  124. Timeout waiting for ZRINIT
  125. csz 1.03 10-01-99 finished.
  126. mode:0
  127. =======================================
  128. GOOD transfer running script command interactively w/ CSZ
  129.  
  130. (/root/bin/) C-Kermit>redirect /usr/bin/csz -vvv \%f
  131. csz 1.03 10-01-99 for POSIX tty=(null)
  132.  
  133. mode:3
  134. Baudrate = 4097
  135.  
  136. Countem: 000 filestr.txt   54
  137.  
  138. countem: Total 1 54
  139. zshhdr: f 4 ZRQINIT 80
  140. wcsend: argc=1
  141. Sending name=filestr.txt
  142. wctxpn: filestr.txt
  143. Retry 0: Awaiting pathname nak for filestr.txt
  144. zgethdr: B 4 ZRINIT 2f000000
  145. Rxbuflen=0 Tframlen=0
  146. Rxbuflen=0
  147. Rxbuflen=0 blklen=1024
  148. Txwindow = 0 Txwspac = 0
  149. wctxpn: 54 7227452623 100644 3 1 54
  150. zsbhdr: f 4 ZFILE 0
  151. zsdata: 41 ZCRCW
  152. zgethdr: B 4 ZRPOS 0
  153. fooseek: pos =0 vpos=0 Canseek=1
  154. within buffer: vpos=0
  155. zsbhdr: f 4 ZDATA 0
  156. zfilbuf: bytcnt =0 vpos=0 blklen=1024
  157. zfilbuf: n=54 vpos=54 Eofseen=1
  158.       0 ZMODEM CRC-32
  159. zsdata: 54 ZCRCE
  160. zsbhdr: f 4 ZEOF 36
  161. zgethdr: B 4 ZRINIT 2f000000
  162. zshhdr: f 4 ZFIN 0
  163. zgethdr: B 4 ZFIN 0
  164. csz 1.03 10-01-99 finished.
  165. mode:0
  166.  
  167.  
  168. +++++++++++++++++++++++++++++++++++++++++++++++++++++++
  169. my script is (with user/passwords replaced):
  170.  
  171. #!/usr/bin/kermit +
  172. #
  173. # Script for dialing  to transfer via Zmodem protocol
  174. #
  175. # Initialize settings
  176. set modem type usrobotics
  177. set line /dev/ttyS1
  178. set protocol zmodem
  179. set speed 57600
  180. set flow rts/cts
  181.  
  182. set dial retries 5
  183.  
  184. # Compuserv local number: 408-268-0799
  185. #assign \%n 268-0799 ;  Compuserv number - San Jose
  186. assign \%n 354-9573 ;  Compuserv number - Santa Clara
  187. assign \%h HOSTNAME   ;  HostID
  188. assign \%p PASSWORD\13      ;  password
  189. assign \%f filestr.out
  190.  
  191. #------------------------------------------------------------------
  192. # Do not edit from here
  193. #
  194. #eightbit
  195. cd /root/bin
  196. .\%d := \v(ndate)-\fsubstr(\v(time),1,2)\fsubstr(\v(time),4,2)
  197.  
  198. define giveup { hangup, close, exit 1 {FATAL: \%1 (Connection closed)} }
  199.  
  200. assign \%u PRODUSER  ;  Receive Production UserID
  201.  
  202. # Connect to dialup server
  203. dial \%n
  204. if fail exit 1
  205. for \%i 1 6 1 {               ; Try up to 6 times to get Host Name prompt
  206.       output \13              ; Send a carriage return and try again
  207.       input 10 Name:      ; Wait 10 sec for it to appear
  208. #      input 10 :        ; Wait 10 sec for it to appear
  209.       if success break        ; Got it - proceed...
  210.   }
  211. pause 1
  212. if ( > \%i 6 ) exit 1 NO HOST PROMPT
  213. lineout \%h                ; Send Host string
  214. input 30 logon id:         ; Wait for Login id: prompt
  215. if fail stop 1 NO LOGON PROMPT
  216. lineout \%u                ; Send the Userid.
  217. input 10 password:         ; Wait for Login id: prompt
  218. if fail stop 1 NO PASSWORD PROMPT
  219. lineout \%p                ; Send the password.
  220. # Wait for connection
  221. input 20 CONNECTED
  222.  
  223. input 20 ZMODEM
  224.  
  225. pause 4
  226. # Perform SEND operation
  227. redirect /usr/bin/csz -vvv \%f
  228. #redirect /usr/bin/sz -vvv \%f
  229. #send \%f
  230. #resend /pathnames:off \%f
  231. if fail stop          ; Update failed
  232.  
  233. exit
  234. +++++++++++++++++++++++++++++++++++++++++++++++++++
  235.  
  236. Here is the comm settings which appear the same for both interactive
  237. sessions and script sessions.
  238.  
  239. (/root/bin/) C-Kermit>sh comm
  240.  
  241. Communications Parameters:
  242.  Line: /dev/ttyS1, speed: unknown, mode: local, modem: usrobotics
  243.  Parity: none, stop-bits: (default) (8N1)
  244.  Duplex: full, flow: rts/cts, handshake: none
  245.  Carrier-watch: auto, close-on-disconnect: off
  246.  Lockfile: /var/lock/LCK..ttyS1
  247.  Terminal bytesize: 7, escape character: 28 (^\)
  248.  
  249. Modem signals unavailable
  250.  
  251. Type SHOW DIAL to see DIAL-related items.
  252. Type SHOW MODEM to see modem-related items.
  253.  
  254. (/root/bin/) C-Kermit>
  255.  
  256.